#include "MCCommand.h"
#include <MCSettings.h>
#include <iostream>

MCCommand::MCCommand(MCCommandManager *manager) 
{
    this->manager = manager;
    presenter = manager->getPresenter();
}

MCCommand::~MCCommand()
{
    
}

void MCCommand::onMouseDown(IMouseArgs &args)
{
}

void MCCommand::onMouseUp(IMouseArgs &args)
{
}

void MCCommand::onMouseMove(IMouseArgs &args)
{
}

void MCCommand::onKeyDown(IKeyArgs &args)
{
    if (args.key() == MCSettings::TerminateKey)
    {
        terminate();
    }
}

ICanvas *MCCommand::presenter_()
{
    return presenter;
}

void MCCommand::finalize()
{
    manager->finishCurrentCommand();
}

void MCCommand::terminate()
{
}
